package ch.zbw.pra.sysventory.domain.scanner;

import java.sql.Timestamp;

import ch.zbw.pra.sysventory.domain.model.Computer;
import ch.zbw.pra.sysventory.domain.model.Scanversion;
import ch.zbw.pra.sysventory.domain.util.MyLogger;
import ch.zbw.pra.sysventory.domain.util.TimeStampGenerator;
import ch.zbw.pra.sysventory.ui.DetailLabel;
import ch.zbw.pra.sysventory.ui.InfoLabel;

public class Scanner {

	private static final org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(Scanner.class);

	private Scanversion scanversion;
	private Timestamp timestampScanversion;

	public Scanversion wmiscan() {

		MyLogger.logDebug(log, "Start scanning...");
		InfoLabel.setTextInfoLabel("Starte Scan des Computers...");

		ScanComputer computerscan = new ScanComputer();
		Computer computer = computerscan.getComputer();
		timestampScanversion = new TimeStampGenerator().getCurrentTimeStamp();

		scanversion = new Scanversion(0, timestampScanversion, computer);
		DetailLabel.clearTextDetailLabel();
		return scanversion;

	}

}
